@import "common";

//通用
.text-left {
    text-align: left !important;
}
.text-right {
    text-align: right !important;
}
.text-center {
    text-align: center !important;
}

.text-underline{
    text-decoration: underline;
}

.text-select{
    -webkit-user-select: text;
}
.text-selectNone{
    -webkit-user-select: none;
}

.text-mini{
    font-size: .6rem;
}

.pointer{
    cursor: pointer;
}

.btn {
    -webkit-transition: background-color 0.4s, color 0.4s, opacity 0.4s;
    cursor: pointer;
}
.btn:active {
    -webkit-transition: none;
}
//列表
.ListView {
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    background-color: #fff;
    line-height: 3.8rem;
    font-size: 1.26rem;
    li {
        line-height: 4.2rem;
        margin-left: 1.5rem;
        border-bottom: 1px solid #ededed;
        display: -webkit-box;
        .label {
            color: #000;
        }
        .value {
            -webkit-box-flex: 1;
            width: 100%;
            text-align: right;
            padding: 0 1rem 0 1.5rem;
            color: #999;
            position: relative;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            .badge {
                background-color: #cc0000;
                color: #fff;
                height: 1.5rem;
                line-height: 1.5rem;
                font-size: 1rem;
                text-align: center;
                display: inline-block;
                border-radius: 100px;
                padding: 0 0.5rem;
            }
            input {
                width: 100%;
                display: block;
                border: none;
                font-size: 1.26rem;
                line-height: 1.26rem;
                height: 4.2rem;
                text-align: right;
            }
            input::-webkit-input-placeholder {
                text-align: right;
            }
            select {
                position: absolute;
                left: 0;
                top: 0;
                width: 100%;
                height: 100%;
                -webkit-appearance: none;
                border: none;
                opacity: 0;
            }
        }
        .value.multi {
            white-space: normal;
            line-height: 2.2rem;
            padding-top: 1rem;
            padding-bottom: 1rem;
        }
        .value.text-left {
            input {
                text-align: left;
            }
            input::-webkit-input-placeholder {
                text-align: left;
            }
        }
        .tipsIcon {
            padding-right: 1rem;
            line-height: 4.2rem;
            text-align: center;
            font-size: 2rem;
            margin-left: -1rem;
            padding-left: 1rem;
        }
        .tipsIcon:active {
            opacity: 0.4;
        }
    }
    li:last-child {
        border-bottom: none;
    }
    li.isLink {
        .value {
            padding-right: 0.5rem;
        }
    }
    li.isLink:after {
        content: "\e600";
        font-family: "iconfont_HybridH5" !important;
        font-style: normal;
        -webkit-font-smoothing: antialiased;
        -webkit-text-stroke-width: 0.2px;
        font-weight: bold;
        -moz-osx-font-smoothing: grayscale;
        padding-right: 0.7rem;
        color: #ccc;
        font-size: 1.8rem;
        line-height: 4.2rem;
        display: block;
    }
    li.isLink:active {
        background-color: #f5f5f5;
        margin-left: 0;
        .label {
            margin-left: 1.5rem;
        }
    }
    li.hasIcon {
        margin-left: 4rem;
        .icon {
            display: -webkit-box;
            -webkit-box-align: center;
            -webkit-box-pack: center;
            margin-left: -3rem;
            margin-right: 1rem;
            .iconfont {
                width: 2rem;
                height: 2rem;
                padding: 0.2rem;
                line-height: 1.6rem;
                border-radius: 0.3rem;
                color: #fff;
                text-align: center;
            }
            .iconfont:before {
                font-size: 1.6rem;
                line-height: 1.6rem;
            }
        }
    }
    li.isLink.hasIcon:active {
        background-color: #f5f5f5;
        margin-left: 0;
        .label {
            margin-left: 0;
        }
        .iconfont {
            margin-left: 4rem;
        }
    }
}
//列表头提示文字
.ListHeadTips {
    color: #999;
    line-height: 3rem;
    padding: 0 1rem;
    font-size: 1.2rem;
}
//页面满宽按钮
.PageBtn {
    font-size: 1.4rem;
    height: 4.2rem;
    line-height: 4.2rem;
    border-radius: 0.4rem;
    text-align: center;
    margin: 3rem 1rem 3rem 1rem;
    -webkit-transition: background-color 0.4s, color 0.4s, opacity 0.4s;
}
.PageBtn:active {
    -webkit-transition: none;
}
//固底按钮
.FixBottomBtn {
    text-align: center;
    line-height: 3.6rem;
    font-size: 1.6rem;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    -webkit-transition: background-color 0.4s, color 0.4s, opacity 0.4s;
}
.FixBottomBtn:active {
    -webkit-transition: none;
}
//同意服务协议复选组件
.AgreementWidget {
    display: inline-block;
    line-height: 2rem;
    font-size: 1.2rem;
    color: #999;
    margin: 1rem 1rem 0;
    input {
        display: none;
    }
    label {
        display: -webkit-box;
        .link {
            color: #2dbfe4;
            line-height: 2rem;
            display: block;
        }
    }
    label:before {
        font-family: "iconfont_HybridH5" !important;
        font-size: 1.8rem;
        font-style: normal;
        -webkit-font-smoothing: antialiased;
        -webkit-text-stroke-width: 0;
        -moz-osx-font-smoothing: grayscale;
        content: "\e60f";
        color: #999;
        display: block;
        margin-right: 0.4rem;
    }
    label.selected:before {
        content: "\e610";
        color: #38aa00;
    }
}
.Module {
    background-color: #fff;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    margin-top: 1.2rem;
    .moduleTitle {
        display: -webkit-box;
        line-height: 3rem;
        font-size: 1.2rem;
        color: #333;
        padding-left: 1rem;
        &.hasBorder {
             border-bottom: 1px solid #ededed;
        }
        .titleIcon {
            display: -webkit-box;
            -webkit-box-align: center;
            -webkit-box-pack: center;
            margin-right: 0.5rem;
            .iconfont {
                background-color: #ccc;
                width: 1.4rem;
                height: 1.4rem;
                line-height: 1.5rem;
                color: #fff;
                text-align: center;
                border-radius: 0.3rem;
            }
        }
        .title {
            -webkit-box-flex: 1;
            width: 100%;
            font-size: 1.3rem;
            line-height: 3rem;
            color: #000;
        }
        .titleRightBtn {
            padding: 0 1rem;
            color: #333;
            .iconfont {
                color: #999;
            }
        }
        .titleRightBtn:active {
            opacity: 0.4;
        }
        .titleRightText {
            padding: 0 1rem;
            color: #a9a9a9;
        }
    }
}

.delRow-transition {
    -webkit-transition: all .4s;
}
.delRow-leave {
    -webkit-transform: scale3d(0.5,0.5,0.5);
    -webkit-transform-origin: center center;
    opacity: 0;
}


//搜索框
.searchBox{
    margin: 1rem auto;
    width: 95%;
    height: 3.6rem;
    line-height: 3.6rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    background: #fff;
    box-sizing: border-box;
    overflow:hidden ;
    display: flex;
    .searchInputBox{
        width: 100%;
        position:relative;
        >input.searchInput{
            background: none;
            font-size: 1.4rem;
            padding-left: 1rem;
            height: 2.6rem;
            line-height: 2.6rem;
            width: 100%;
            box-sizing: border-box;
        }
        
        >i.icon-cuowu{
            position: absolute;
            right: 1rem;
            top: 50%;
            transform: translateY(-50%);
            -webkit-transform: translateY(-50%);
            font-size: 1.8rem;
        }
    }
}

//旋转动画
.rotateAnimate{
    display: inline-block;
    -webkit-animation: rotate 1s linear infinite;
    animation: rotate 1s linear infinite;
    
    line-height:1rem;
    font-size:1.2rem;
}

@-webkit-keyframes rotate{
    from{
        -webkit-transform: rotate(0);
                transform: rotate(0);
    }
    to{
        -webkit-transform: rotate(360deg);
                transform: rotate(360deg);
    }
}
@keyframes rotate{
    from{
        -webkit-transform: rotate(0);
                transform: rotate(0);
    }
    to{
        -webkit-transform: rotate(360deg);
                transform: rotate(360deg);
    }
}

//绝对居中
.centerPer{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    -webkit-transform: translate(-50%,-50%);
}

//水平可滚动图片列表
.imgListBox{
    display: -webkit-box;
    overflow: auto;
    box-sizing: content-box;
    padding:.8rem 0;
    .imgList{
        width: 60px;
        margin: 0 .5rem;
        padding: 0.2rem;
        border: 1px solid #e0e0e0;
        cursor: pointer;
        border-radius: 3px;
    }
}

//单行行文字溢出省略号
.textOverflow_1{
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    word-wrap: break-word;
    -webkit-box-orient: vertical;
}

//2行文字溢出省略号
.textOverflow_2{
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}


//表格
table{ 
    table-layout:fixed; 
    empty-cells:show; 
    border-collapse: collapse; 
    margin:0 auto; 
} 


.table{ 
    border:1px solid #cad9ea; 
    color:#666; 
} 
.table th { 
    background-repeat:repeat-x; 
    height:30px; 
} 
.table td,.table th{ 
    border:1px solid #e0e0e0; 
} 
//紧凑型表格
.table.list.compact{
    flex: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    thead{
        padding-right: 5px;
         tr{
            height: 2rem;
            padding: 0;
            th{
                line-height: 2rem;
                font-size: .6rem;
                select{
                    border: none;
                    outline: none;
                    background: none;
                }
            }
        }
    }
        
    tbody{
        overflow-y: scroll;
        tr{
            min-height: 2rem;
            td{
                min-height: 2rem;
                border-right: 1px solid #ccc;
                padding:0; 
                &:last-child{
                    border-right: none;
                }
                input{
                    width: 100%;
                    height: 2rem;
                    background: none;
                    padding:0 .5rem;
                }
                
                select{
                    display: inline-block;
                    border: none;
                    outline: none;
                    background: none;
                }
            }
        }
    }
}
.table.list{
    width: 100%;
    border: none;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    border: 1px solid #e0e0e0;

    .w5{
        width: 5%;
    }
    .w8{
        width: 8%;
    }
    .w10{
        width: 10%;
    }
    .w15{
        width: 15%;
    }
    .w20{
        width: 20%;
    }
    .w25{
        width: 25%;
    }
    .w30{
        width: 30%;
    }
    
    
    thead{
        background: #F7F7F7;
        position: relative;
        z-index: 2;
        display: block;
        position: relative;
        z-index: 2;
        border-bottom: 1px solid #e0e0e0;
        tr{
            display:block;
            height:3rem;
            padding: .5rem 0;
            th{
                float: left;
                border: none;
                height: auto;
                vertical-align: middle;
                line-height: 2rem;
                border-right: 1px solid #ccc;
                &:last-child{
                    border: none;
                }
                
            }
        }
    }
    tbody{
        overflow: auto;
        -webkit-box-flex: 1;
        -ms-flex: 1;
        flex: 1;
        -webkit-flex: 1;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        display: flex;
        flex-direction: column;
        tr{
            min-height: 4rem;
            transition:all .2s; 
            -webkit-transition:all .2s; 
            display: -webkit-box;
            margin-top:-1px; 
            td{
                font-size: .7rem;
                padding: .3rem .5rem;
                min-height: 4rem;
                border-right: none;
                border-left: none;
                display: -webkit-box;
                -webkit-box-pack: center;
                -webkit-box-orient: vertical;
            }
            &:first-child{
                td{
                    border-top: none;
                }
            }
            &:hover{
                background:#f3f3f3 ;
            }
        }
        
        
    }
    th{
        font-size: .8rem;
        font-weight: normal;
        border-right: none;
        border-left: none;
        
    }
}

.ulList{
    display: -webkit-box;
    li{
        &:first-child{
            border-bottom-left-radius: 5px;
            border-top-left-radius: 5px;
        }
        &:last-child{
            border-bottom-right-radius: 5px;
            border-top-right-radius: 5px;
        }
        height: 1.7rem;
        line-height: 1.7rem;
        padding: 0 .5rem;
        cursor: pointer;
        position: relative;
        color: #666;
        font-size: .8rem;
        border: 1px solid #ccc;
        margin-right: -1px;
        position: relative;
        
    }
    li.active{  
        background: #337ab7;
        border-color:#337ab7;
        color:#fff;
        z-index: 2;
    }
}

.dotting {
    display: inline-block; width: 10px; min-height: 2px;
    padding-right: 2px;
    border-left: 2px solid currentColor; border-right: 2px solid currentColor;   
    background-color: currentColor; background-clip: content-box;
    box-sizing: border-box;
    animation: dot 4s infinite step-start both;
    -webkit-animation: dot 4s infinite step-start both;
}

:root .dotting { margin-left: 2px; padding-left: 2px; } 

@keyframes dot {
    25% { border-color: transparent; background-color: transparent; }          /* 0个点 */
    50% { border-right-color: transparent; background-color: transparent; }    /* 1个点 */
    75% { border-right-color: transparent; }                                   /* 2个点 */
}

@-webkit-keyframes dot {
    25% { border-color: transparent; background-color: transparent; }          /* 0个点 */
    50% { border-right-color: transparent; background-color: transparent; }    /* 1个点 */
    75% { border-right-color: transparent; }                                   /* 2个点 */
}

//商城商品列表
.shopList{      
    li.item{
        display: -webkit-box;
        background: #fff;
        transition:background .2s; 
        &:last-child{
            .textDescribe{
                border: none;
            }
        }
        &:active{
            background: #f0f0f0;
        }
        
        .imgBox{
            width: 32%;
            margin: .5rem;
            display: -webkit-box;
            align-items: center;
            position: relative;
            overflow: hidden;
        }
        .textDescribe{
            -webkit-box-flex: 1;
            padding: 1rem 1rem .3rem;
            border-bottom: 1px solid #f0f0f0;
            p.textOverflow_2{
                height: 3.6rem;
            }
            p{
                word-wrap:break-word;
                color: #333;
                line-height: 1.8rem;
                font-size: 1.2rem;
            }
            p.price{
                margin-top:1rem;
                color: #FF0000;
                i{
                    font-style: normal;
                    font-size: 1.7rem;
                }
            }
            p.placeText{
                color: #999;
                font-size: 1rem;
            }
        }
    }
}

.inlineBlock{
    display: inline-block !important; 
}

.emojiPre{
    width: 20px;
    height: auto;
    margin: 0 2px;
}

/*上下弹动动画*/
.toggle-transition{
    transform: translateY(0);
    transition:all .3s;
}
.toggle-enter,.toggle-leave{
    transform: translateY(-20rem);
    z-index: 0;
}

/*上下弹动动画*/
.toggleup-transition{
    transform: translateY(0);
    transition:all .3s;
}
.toggleup-enter,.toggleup-leave{
    transform: translateY(200rem);
    z-index: 0;
}

/*左右弹动动画*/
.around-transition{
    transform: translateX(0);
    transition:all .3s;
}
.around-enter,.around-leave{
    transform: translateX(100rem);
}


//来回弹动
.rolling-transition{
    opacity: 1;
    transition:all .3s;
    height: auto;
}

.rolling-enter,.rolling-leave{
    opacity: 0;
    height: 0 !important;
}



/*渐变动画*/
.opacity-transition{
    opacity: 1;
    transition:opacity .3s;
}
.opacity-enter,.opacity-leave{
    opacity: 0;
}

/*波浪动画*/
.staggered-transition {
    transition: all .5s ease;
    height: auto;
    margin-bottom: 1px;
}
.staggered-enter, .staggered-leave {
    opacity: 0 !important;
    height: 0 !important;
}

//单选框
.radio{
    label{
        font-size: .8rem;
        position: relative;
        padding-left: 1rem;
        cursor: pointer;
        &:before{
            content: "";
            width: .8rem;
            height: .8rem;
            margin-right: 10px;
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            -webkit-transform: translateY(-50%);
            border-radius: 50%;
            border: 1px solid  #3797fc;
            box-sizing: border-box;
        }
    }
    input[type='radio']{
        display:none; 
        &:checked+label:after{
            content: "";
            position: absolute;
            width: .5rem;
            height: .5rem;
            background: #3797fc;
            border-radius: 50%;
            left: 3px;
            top: 50%;
            transform: translateY(-50%);
            -webkit-transform: translateY(-50%);
        }
    }
}

//多选框
.checkbox{
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    label{
        font-size: .8rem;
        position: relative;
        padding-left: .5rem;
        cursor: pointer;
    }
    input[type='checkbox']{
        position:absolute;
        height:100%;
        opacity: 0;
        left: 0;
        top: 0;
        width:100%;
        &:checked+span.iconfont_pc{
            display: block;
        }
    }
    
    .checkItem{
        width: 1rem;
        height: 1rem;
        border: 1px solid #ccc;
        text-align: center;
        position: relative; 
        line-height: 1rem;
        span{
            font-size: .8rem;
            display: none;
            color: #1973BF;
        }
    }
}

//下拉刷新无限加载公用样式
.dropload-up {
  position: relative;
  height: 0;
  overflow: hidden;
  font-size: 12px;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);

}
.dropload-refresh, .dropload-update, .dropload-load, .dropload-noData,.dropload-down {
  text-align: center;
  font-size: 1.4rem;
  height: 2rem;
  line-height: 2rem;
}

.dropload-noData,.dropload-down{
    margin: 1rem 0;
}
.dropload-load .loading {
  display: inline-block;
  width: 15px;
  height: 15px;
  line-height: 2rem;
  font-size: 1.4rem;
  border-radius: 100%;
  border: 2px solid #666;
  border-bottom-color: transparent;
  vertical-align: middle;
  -webkit-animation: rotate 0.75s linear infinite;
  animation: rotate 0.75s linear infinite;
}
@-webkit-keyframes rotate {
  from {-webkit-transform:rotate(0deg);}
  to {-webkit-transform:rotate(360deg);}
}


.waggle{
    animation:waggle .5s ease-in infinite ;
}

@keyframes waggle{
    0%{
        transform: rotateY(0);
    }
    15%{
        transform: rotateY(-10deg);
    }
    30%{
        transform: rotateY(0);
    }
    45%{
        transform: rotateY(10deg);
    }
    60%{
        transform: rotateY(0);
    }
    75%{
        transform: rotateY(-10deg);
    }
    90%{
        transform: rotateY(0);
    }
}

//标题
.alertTitle{
    text-align: center;
    line-height:2.4rem;
    position:relative;
    border-bottom: 1px solid #e5e5e5;
    background:#fff;
    
    h3{
        font-weight: normal;
        font-size: 1rem;
    }
    >span{
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        cursor: pointer;
        color: #666;
        padding: 0 10px;
    }
}

/*模块*/
.module{
    background: #fff;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    margin-top: 20px;
    padding: .3rem 1rem;
    font-size: 30px;
    box-sizing: border-box;
}

.module .title{
    border-bottom: 1px solid #ccc;
    line-height: 60px;
    height: 60px;
    padding-bottom:10px;
    margin-bottom: 1rem;
    font-size: .8rem;
    color: #333;
}

//图文列表
.listView{
    display: flex;
    align-items:center;
    border-bottom:1px solid #f1f1f1;
    transition: all .2s;
    padding: .5rem 1rem;
}

.listView .listImg{
    width: 4rem;
    height: 4rem;
    position: relative;
    background: #EDEDED;
    overflow: hidden;
    margin-right: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}
.listView .content{
    flex: 1;
    color: #101010;
    line-height: 1.5rem;
    width: 100%;
    font-size: .8rem;
    color: #333;
}

.listView .icon .iconfont{
    font-size:40px;
    color: #999;
}

.ncpt_slide_bg{
    border-radius: 0 !important;
    border-color:#E8E8E8 !important;
}

.ncpt_hint_txt{
    color: #538AD4 !important;
}

.ncpt_widget,.ncpt_slide_bg,.ncpt_hint_txt{
    min-height: 38px !important;
    line-height: 38px !important;
}

.ncpt_slide_fg{
    width: 32px;
    height: 32px;
    margin: 2px;
    box-shadow: 0 0 1px 1px #ccc;
    background: #fff;
    position: relative;
    
    &:after,&:before{
        position: absolute;
        content:"";
        width:3px; 
        height: 3px;
        background: #D9D9D9;
        height: 80%;
        left: 8px;
        top: 50%;
        box-shadow: 0 0 1px 1px #ccc inset;
        transform: translateY(-50%);
        -webkit-transform: translateY(-50%);
    }
    
    &:before{
        left: auto;
        right: 8px;
    }
    
    img{
        width: 40px;
        height: 38px !important;
        opacity: 0;
    }
} 
